home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-ARM / PROC-FNS.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  3KB  |  120 lines

  1. /*
  2.  * linux/include/asm-arm/proc-fns.h
  3.  *
  4.  * Copyright (C) 1997 Russell King
  5.  */
  6. #ifndef __ASM_PROCFNS_H
  7. #define __ASM_PROCFNS_H
  8.  
  9. #include <asm/page.h>
  10.  
  11. #ifdef __KERNEL__
  12. /*
  13.  * Don't change this structure
  14.  */
  15. extern struct processor {
  16.     const char *name;
  17.     /* MISC
  18.      *
  19.      * flush caches for task switch
  20.      */
  21.     void (*_switch_to)(void *prev, void *next);
  22.     /*
  23.      * get data abort address/flags
  24.      */
  25.     void (*_data_abort)(unsigned long pc);
  26.     /*
  27.      * check for any bugs
  28.      */
  29.     void (*_check_bugs)(void);
  30.     /*
  31.      * Set up any processor specifics
  32.      */
  33.     void (*_proc_init)(void);
  34.     /*
  35.      * Disable any processor specifics
  36.      */
  37.     void (*_proc_fin)(void);
  38.     /*
  39.      * Processor architecture specific
  40.      */
  41.     union {
  42.         struct {
  43.             /* CACHE
  44.              *
  45.              * flush all caches
  46.              */
  47.             void (*_flush_cache_all)(void);
  48.             /*
  49.              * flush a specific page or pages
  50.              */
  51.             void (*_flush_cache_area)(unsigned long address, unsigned long end, int flags);
  52.             /*
  53.              * flush cache entry for an address
  54.              */
  55.             void (*_flush_cache_entry)(unsigned long address);
  56.             /*
  57.              * flush a virtual address used for a page table
  58.              * note D-cache only!
  59.              */
  60.             void (*_flush_cache_pte)(unsigned long address);
  61.             /*
  62.              * flush a page to RAM
  63.              */
  64.             void (*_flush_ram_page)(unsigned long page);
  65.             /* TLB
  66.              *
  67.              * flush all TLBs
  68.              */
  69.             void (*_flush_tlb_all)(void);
  70.             /*
  71.              * flush a specific TLB
  72.              */
  73.             void (*_flush_tlb_area)(unsigned long address, unsigned long end, int flags);
  74.             /*
  75.              * Set a PMD (handling IMP bit 4)
  76.              */
  77.             void (*_set_pmd)(pmd_t *pmdp, pmd_t pmd);
  78.             /*
  79.              * Special stuff for a reset
  80.              */
  81.             unsigned long (*reset)(void);
  82.             /*
  83.              * flush an icached page
  84.              */
  85.             void (*_flush_icache_area)(unsigned long start, unsigned long end);
  86.             /*
  87.              * write back dirty cached data
  88.              */
  89.             void (*_cache_wback_area)(unsigned long start, unsigned long end);
  90.             /*
  91.              * purge cached data without (necessarily) writing it back
  92.              */
  93.             void (*_cache_purge_area)(unsigned long start, unsigned long end);
  94.         } armv3v4;
  95.         struct {
  96.             /* MEMC
  97.              *
  98.              * remap memc tables
  99.              */
  100.             void (*_remap_memc)(void *tsk);
  101.             /*
  102.              * update task's idea of mmap
  103.              */
  104.             void (*_update_map)(void *tsk);
  105.             /*
  106.              * update task's idea after abort
  107.              */
  108.             void (*_update_mmu_cache)(void *vma, unsigned long addr, pte_t pte);
  109.             /* XCHG
  110.              */
  111.             unsigned long (*_xchg_1)(unsigned long x, volatile void *ptr);
  112.             unsigned long (*_xchg_2)(unsigned long x, volatile void *ptr);
  113.             unsigned long (*_xchg_4)(unsigned long x, volatile void *ptr);
  114.         } armv2;
  115.     } u;
  116. } processor;
  117. #endif    
  118. #endif
  119.  
  120.